//package com.lpit.config;
//
//
//import com.lpit.interceptor.LoginInterceptor;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class WebMvcConfig implements WebMvcConfigurer {
////    @Autowired
//    private LoginInterceptor loginInterceptor;
//
//    /**
//     * 设置拦截器的规则
//     * @param registry
//     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor)
//                //拦截规则，拦截那些路径
//                .addPathPatterns("/**")
//                //那些路径不拦截
//                .excludePathPatterns("/login","/**/*.html","/**/*.js","/**/*.png","/error","/**/*.css","/**/*.jpg","/*.ico","/**/*.map","/start");
//    }
//}
